package com.br.apurn.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="NEWS")
public class News implements Persistente {
	
	private static final long serialVersionUID = 1L;

	public News() {
		
	}
	
	public News(int id, String title, String content){
		super();
		this.id = id;
		this.title = title;
		this.content = content;
	}
	
	
	@Id	
	@Column(name="news_id", nullable=false)	
	@SequenceGenerator(name="my_seq", sequenceName="account_user_id_seq")
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="my_seq")
	private Integer id;
	
	private String title;
	
	private String content;
	
	private String date;
	
	public News(String news_) {
		this.title = news_;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	@Column(name="TITLE")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	@Column(name="CONTENT")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name="DATE")
	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}


}
